import mallApi from "@/api/declaration/mall/mallApi"
import httpRequest from "@/config/axios/httpRequest"
import { BrandModel } from "@/models/mall/BrandModel"



// 创建商品品牌
export const createBrand = (data: BrandModel) => {
  return httpRequest.post(mallApi.CreateBrand, data)
}

// 更新商品品牌
export const updateBrand = (data: BrandModel) => {
  return httpRequest.put(mallApi.UpdateBrand, data)
}

// 删除商品品牌
export const deleteBrand = (id: number) => {
  return httpRequest.delete(mallApi.DeleteBanner, { params: { id } })
}

// 获得商品品牌
export const getBrand = (id: number) => {
  return httpRequest.get(mallApi.GetBrand, { params: { id } })
}

// 获得商品品牌列表
export const getBrandParam = (params: PageParam) => {
  return httpRequest.get(mallApi.GetBrandParam, { params })
}

// 获得商品品牌精简信息列表
export const getSimpleBrandList = () => {
  return httpRequest.get(mallApi.GetSimpleBrandList)
}
